﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<SacNetUG.Models.StateViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Index</h2>
    <table>
        <tr>
            <th>
                Id
            </th>
            <th>
                Abbreviation
            </th>
            <th>
                Name
            </th>
        </tr>
        <% foreach (var item in Model.States)
           { %>
        <tr>
            <td>
                <%= Html.Encode(item.Id) %>
            </td>
            <td>
                <%= Html.Encode(item.Abbreviation) %>
            </td>
            <td>
                <%= Html.Encode(item.Name) %>
            </td>
        </tr>
        <% } %>
        <tr>
            <td>
                <%if (Model.Page != Model.PreviousPage){%>
                  <%= Html.ActionLink("Prev", MVC.State.Index(Model.PreviousPage))%>
                  <%}%>
            </td>
            <td>
            </td>
            <td>
                <%if (Model.Page != Model.NextPage){%>
                    <%=Html.ActionLink("Next", MVC.State.Index(Model.NextPage))%>
                <%}%>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
</asp:Content>
